package com.study.talk.module.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.study.talk.module.entity.Friend;
import com.study.talk.module.entity.InviteUserRecord;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.mapstruct.Mapper;
/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author thor
 * @since 2023-12-18
 */
@Mapper
public interface InviteUserRecordMapper extends BaseMapper<InviteUserRecord> {
    @Delete("delete from invite_user_record where user_id = #{userId} and friend_id = #{friendId}")
    void removeInviteFriend(Integer userId,Integer friendId);

    @Select("select * from invite_user_record where  user_id=#{userId} and friend_id=#{friendId}")
    InviteUserRecord queryIsFriend(Integer userId, Integer friendId);
}
